//import moduleInfo from './moduleName.js'
//import path from 'path'
//console.log("moduleName:" + moduleInfo.name)
//function fixModuleName(path){
//	//分割路劲
//	let pathInfo = path.split('/')
//	//去掉文件后缀名
//	let chunckName = pathInfo[pathInfo.length - 1].replace(/\..*/,'')
//	if(chunckName == ''){
//		chunckName = 'defaultChunck'
//	}
//	return String(moduleInfo.name + "-" + chunckName)
//}
import serviceDetail from '../pages/service-detail.vue';
// function() {
// 			return require.ensure([], function() {
// 				return require('../pages/service-detail.vue');
// 			}, 'service-detail')
// }
var router = [{
		path: '/index',
		name: 'service-list',
		component: function() {
			return require.ensure([], function() {
				return require('../pages/service-list.vue');
			}, 'service-list')
		}
	},
	{
		path: '/service-detail',
		name: 'service-detail',
		component: serviceDetail,
	},
	{
		path: '/patients',
		name: 'patient-list',
		component: function() {
			return require.ensure([], function() {
				return require('../pages/patient-list.vue');
			}, 'patient-list')
		}
	},
	{
		path: '/patient-detail',
		name: 'patient-detail',
		component: function() {
			return require.ensure([], function() {
				return require('../pages/patient-detail.vue');
			}, 'patient-detail')
		}
	},
	{
		path: '/char',
		name: 'char',
		component: function() {
			return require.ensure([], function() {
				return require('../pages/char.vue');
			}, 'char')
		}
	},
	{
		path:'/scan',
		name:'scan',
		component:function(){
			return require.ensure([],function(){
				return require('../pages/scan.vue');
			},'char')
		}
	},
	{ path: '*', redirect: '/index' }
]
export default router